import os

from loguru import logger

env = os.getenv('DOCU_ANALYZE_ENV')  #  可以改成其他名字，自己进行设置

try:
  if env == 'dzy_dev':
    from .dzy_dev import dzy_dev_Config  as Config
  elif env=='mydoidl':
    from .mydoidl import mydoidl_Config as Config
  elif env=='h20_prod':
    from .h20_prod import h20_prod_Config as Config
  else:  # 默认使用本地开发环境的配置，省去设置环境变量的环节
    from .dzy_dev import dzy_dev_Config  as Config
  logger.info(f'Loading config for {env or "unspecified"} environment for DOCU_ANALYZE_ENV ')


except ImportError as e :
  logger.warning( e )
  logger.warning('Loading config for %s environment failed, use default config instead.', env or 'unspecified')
  from .default import Config as Config

